

{php}
$row['values']=json_decode( $row['values'],true);
{/php}
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input id="c-key" type="hidden" data-rule="required"  class="form-control" name="row[key]" value="{$key}" readonly/>
    <div class="row">
        <div class=" form-group">
            <label for="c-describe" class="control-label col-xs-12 col-sm-2">{:__('应用名称')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-describe" data-rule="required" type="text" class="form-control" name="row[describe]" value="{$row.describe}" />
            </div>
        </div>
        <div class=" form-group">
            <label for="c-id" class="control-label col-xs-12 col-sm-2">{:__('应用ID')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-id"  type="text" class="form-control" name="row[id]" value="{$row.id}" disabled />
            </div>
        </div>

        <div class=" form-group">
            <label for="c-describe" class="control-label col-xs-12 col-sm-2">{:__('应用秘钥')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-secret" data-rule="required" type="text" class="form-control" name="row[values][secret]" value="{$row['values']['secret']}" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('客户来源')}:</label>
            <div class="col-xs-12 col-sm-8">

                {:build_select('row[values][source]', $sourceList,$row['values']['source'], ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
                <span class="text-gray">通过该应用添加的客户来源</span>
            </div>
        </div>
        <div class="form-group">
            <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('分配团队')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_select('row[values][group_id]', $groupdata, $row['values']['group_id'], ['class'=>'form-control selectpicker', 'id'=>'c-group_id'])}
                <span class="help-block">*如果归属员工字段为空，自动分配,都不选进入公海。</span>
            </div>
        </div>


        <div class="form-group">
            <label for="c-owner_user_id" class="control-label col-xs-12 col-sm-2">{:__('分配员工')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-owner_user_id"  data-source="facrm/common/selectpage/model/admin" data-multiple="true" data-field="nickname" class="form-control selectpage" name="row[values][owner_user_id]" type="text" value="{$row['values']['owner_user_id']}" placeholder="选择">
                <span class="help-block">*如果选择了指定员工，归属团队不生效,都不选进入公海。</span>
            </div>
        </div>

        <div class=" form-group">
            <label for="c-white_list" class="control-label col-xs-12 col-sm-2">{:__('白名单IP')}:</label>
            <div class="col-xs-12 col-sm-8">
                <textarea id="c-white_list" class="form-control" name="row[values][white_list]">{$row['values']['white_list']}</textarea>
                <span class="text-gray">仅限访问IP，一行条,留空不限制</span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_select('row[status]', [1=>'正常','0'=>'禁用'], $row['status'], ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
                <span class="text-gray"></span>
            </div>
        </div>

        <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="submit" class="btn btn-success btn-embossed disabled">{:__('submit')}</button>
                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
            </div>
        </div>
</form>




